package com.lanou.zy.projecta.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by dllo on 15/11/3.
 */
public class RoundWorldViewPagerAdapter extends FragmentPagerAdapter{
    private List<Fragment> roundWorldFragment;
    private List<String> titles;

    public RoundWorldViewPagerAdapter(FragmentManager fm, List<Fragment> fragments, List<String> title) {
        super(fm);
        this.roundWorldFragment = fragments;
        this.titles = title;
    }

    @Override
    public Fragment getItem(int position) {
        return roundWorldFragment.get(position);
    }

    @Override
    public int getCount() {
        return titles.size();
    }

    public CharSequence getPageTitle(int position) {
        return titles.get(position);
    }
}
